package com.java1412.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

/**
 * @author java1412
 * @create 2021-06-07 16:29
 */
// @Configuration
public class ApplicationContextConfig {
    @Bean
    @LoadBalanced   // 开启负载均衡
    public RestTemplate getRestTemplate() {
        return new RestTemplate();
    }
}
